﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 入库表基础输入参数
/// </summary>
public class StorageBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 入库单号
    /// </summary>
    public virtual string? StorageCode { get; set; }
    
    /// <summary>
    /// 入库类型
    /// </summary>
    public virtual string? StorageIdType { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    public virtual string? StorageStatus { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public virtual long? InboundId { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>
    public virtual DateTime? StorageDate { get; set; }
    
    /// <summary>
    /// 进货订单编号
    /// </summary>
    public virtual long? IncomingOrdersId { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    public virtual int? StorageNumber { get; set; }
    
    /// <summary>
    /// 入库金额
    /// </summary>
    public virtual int? StorageMoney { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public virtual long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public virtual string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public virtual string? ContactNumber { get; set; }
    
    /// <summary>
    /// 组织机构
    /// </summary>
    public virtual long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public virtual long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? StorageDesc { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public virtual string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public virtual long? FormsPerson { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    public virtual DateTime? FormsTime { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public virtual long? Department { get; set; }
    
    /// <summary>
    /// 审核人
    /// </summary>
    public virtual long? Reviewers { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public virtual DateTime? ReviewTime { get; set; }
    
}

/// <summary>
/// 入库表分页查询输入参数
/// </summary>
public class PageStorageInput : BasePageInput
{
    /// <summary>
    /// 入库单号
    /// </summary>
    public string? StorageCode { get; set; }
    
    /// <summary>
    /// 入库类型
    /// </summary>
    public string? StorageIdType { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    public string? StorageStatus { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public long? InboundId { get; set; }
    
    /// <summary>
    /// 入库日期范围
    /// </summary>
     public DateTime?[] StorageDateRange { get; set; }
    
    /// <summary>
    /// 进货订单编号
    /// </summary>
    public long? IncomingOrdersId { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    public int? StorageNumber { get; set; }
    
    /// <summary>
    /// 入库金额
    /// </summary>
    public int? StorageMoney { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 组织机构
    /// </summary>
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public long? FormsPerson { get; set; }
    
    /// <summary>
    /// 制单时间范围
    /// </summary>
     public DateTime?[] FormsTimeRange { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public long? Department { get; set; }
    
    /// <summary>
    /// 审核人
    /// </summary>
    public long? Reviewers { get; set; }
    
    /// <summary>
    /// 审核时间范围
    /// </summary>
     public DateTime?[] ReviewTimeRange { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 入库表增加输入参数
/// </summary>
public class AddStorageInput
{
    /// <summary>
    /// 入库单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "入库单号字符长度不能超过32")]
    public string? StorageCode { get; set; }
    
    /// <summary>
    /// 入库类型
    /// </summary>
    [MaxLength(32, ErrorMessage = "入库类型字符长度不能超过32")]
    public string? StorageIdType { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [MaxLength(32, ErrorMessage = "入库状态字符长度不能超过32")]
    public string? StorageStatus { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public long? InboundId { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>
    public DateTime? StorageDate { get; set; }
    
    /// <summary>
    /// 进货订单编号
    /// </summary>
    public long? IncomingOrdersId { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    public int? StorageNumber { get; set; }
    
    /// <summary>
    /// 入库金额
    /// </summary>
    public int? StorageMoney { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系方式字符长度不能超过32")]
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 组织机构
    /// </summary>
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [MaxLength(32, ErrorMessage = "上传附件字符长度不能超过32")]
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public long? FormsPerson { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    public DateTime? FormsTime { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public long? Department { get; set; }
    
    /// <summary>
    /// 审核人
    /// </summary>
    public long? Reviewers { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public DateTime? ReviewTime { get; set; }
    
}

/// <summary>
/// 入库表删除输入参数
/// </summary>
public class DeleteStorageInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 入库表更新输入参数
/// </summary>
public class UpdateStorageInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 入库单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "入库单号字符长度不能超过32")]
    public string? StorageCode { get; set; }
    
    /// <summary>
    /// 入库类型
    /// </summary>    
    [MaxLength(32, ErrorMessage = "入库类型字符长度不能超过32")]
    public string? StorageIdType { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>    
    [MaxLength(32, ErrorMessage = "入库状态字符长度不能超过32")]
    public string? StorageStatus { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>    
    public long? InboundId { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>    
    public DateTime? StorageDate { get; set; }
    
    /// <summary>
    /// 进货订单编号
    /// </summary>    
    public long? IncomingOrdersId { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>    
    public int? StorageNumber { get; set; }
    
    /// <summary>
    /// 入库金额
    /// </summary>    
    public int? StorageMoney { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>    
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系方式字符长度不能超过32")]
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 组织机构
    /// </summary>    
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>    
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>    
    [MaxLength(32, ErrorMessage = "上传附件字符长度不能超过32")]
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>    
    public long? FormsPerson { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>    
    public DateTime? FormsTime { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>    
    public long? Department { get; set; }
    
    /// <summary>
    /// 审核人
    /// </summary>    
    public long? Reviewers { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>    
    public DateTime? ReviewTime { get; set; }
    
}

/// <summary>
/// 入库表主键查询输入参数
/// </summary>
public class QueryByIdStorageInput : DeleteStorageInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataStorageInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 入库表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportStorageInput : BaseImportInput
{
    /// <summary>
    /// 入库单号
    /// </summary>
    [ImporterHeader(Name = "入库单号")]
    [ExporterHeader("入库单号", Format = "", Width = 25, IsBold = true)]
    public string? StorageCode { get; set; }
    
    /// <summary>
    /// 入库类型
    /// </summary>
    [ImporterHeader(Name = "入库类型")]
    [ExporterHeader("入库类型", Format = "", Width = 25, IsBold = true)]
    public string? StorageIdType { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [ImporterHeader(Name = "入库状态")]
    [ExporterHeader("入库状态", Format = "", Width = 25, IsBold = true)]
    public string? StorageStatus { get; set; }
    
    /// <summary>
    /// 仓库名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? InboundId { get; set; }
    
    /// <summary>
    /// 仓库名称 文本
    /// </summary>
    [ImporterHeader(Name = "仓库名称")]
    [ExporterHeader("仓库名称", Format = "", Width = 25, IsBold = true)]
    public string InboundFkDisplayName { get; set; }
    
    /// <summary>
    /// 入库日期
    /// </summary>
    [ImporterHeader(Name = "入库日期")]
    [ExporterHeader("入库日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? StorageDate { get; set; }
    
    /// <summary>
    /// 进货订单编号 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? IncomingOrdersId { get; set; }
    
    /// <summary>
    /// 进货订单编号 文本
    /// </summary>
    [ImporterHeader(Name = "进货订单编号")]
    [ExporterHeader("进货订单编号", Format = "", Width = 25, IsBold = true)]
    public string IncomingOrdersFkDisplayName { get; set; }
    
    /// <summary>
    /// 入库数量
    /// </summary>
    [ImporterHeader(Name = "入库数量")]
    [ExporterHeader("入库数量", Format = "", Width = 25, IsBold = true)]
    public int? StorageNumber { get; set; }
    
    /// <summary>
    /// 入库金额
    /// </summary>
    [ImporterHeader(Name = "入库金额")]
    [ExporterHeader("入库金额", Format = "", Width = 25, IsBold = true)]
    public int? StorageMoney { get; set; }
    
    /// <summary>
    /// 供应商 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 供应商 文本
    /// </summary>
    [ImporterHeader(Name = "供应商")]
    [ExporterHeader("供应商", Format = "", Width = 25, IsBold = true)]
    public string VendorFkDisplayName { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [ImporterHeader(Name = "联系人")]
    [ExporterHeader("联系人", Format = "", Width = 25, IsBold = true)]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [ImporterHeader(Name = "联系方式")]
    [ExporterHeader("联系方式", Format = "", Width = 25, IsBold = true)]
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 组织机构 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 组织机构 文本
    /// </summary>
    [ImporterHeader(Name = "组织机构")]
    [ExporterHeader("组织机构", Format = "", Width = 25, IsBold = true)]
    public string OrganizationalStructureFkDisplayName { get; set; }
    
    /// <summary>
    /// 经办人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Attn { get; set; }
    
    /// <summary>
    /// 经办人 文本
    /// </summary>
    [ImporterHeader(Name = "经办人")]
    [ExporterHeader("经办人", Format = "", Width = 25, IsBold = true)]
    public string AttnFkDisplayName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [ImporterHeader(Name = "上传附件")]
    [ExporterHeader("上传附件", Format = "", Width = 25, IsBold = true)]
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 制单人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? FormsPerson { get; set; }
    
    /// <summary>
    /// 制单人 文本
    /// </summary>
    [ImporterHeader(Name = "制单人")]
    [ExporterHeader("制单人", Format = "", Width = 25, IsBold = true)]
    public string FormsPersonFkDisplayName { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    [ImporterHeader(Name = "制单时间")]
    [ExporterHeader("制单时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? FormsTime { get; set; }
    
    /// <summary>
    /// 所在部门 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Department { get; set; }
    
    /// <summary>
    /// 所在部门 文本
    /// </summary>
    [ImporterHeader(Name = "所在部门")]
    [ExporterHeader("所在部门", Format = "", Width = 25, IsBold = true)]
    public string DepartmentFkDisplayName { get; set; }
    
    /// <summary>
    /// 审核人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Reviewers { get; set; }
    
    /// <summary>
    /// 审核人 文本
    /// </summary>
    [ImporterHeader(Name = "审核人")]
    [ExporterHeader("审核人", Format = "", Width = 25, IsBold = true)]
    public string ReviewersFkDisplayName { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    [ImporterHeader(Name = "审核时间")]
    [ExporterHeader("审核时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? ReviewTime { get; set; }
    
}
